/*    */ package net.sourceforge.appgen.generator;
/*    */ 
/*    */ import java.io.File;
/*    */ import net.sourceforge.appgen.model.Entity;
/*    */ import net.sourceforge.appgen.model.GenerationInformation;
/*    */ import net.sourceforge.appgen.util.FileUtils;
/*    */ 
/*    */ public class PomFileGenerator extends OnceFileGenerator
/*    */ {
/*    */   public static final String TEMPLATE = "pom.xml";
/*    */ 
/*    */   public PomFileGenerator(GenerationInformation generationInformation)
/*    */   {
/* 33 */     super(generationInformation);
/*    */   }
/*    */ 
/*    */   public File generateFile(Entity entity, File in, File out) throws Exception {
/* 37 */     FileUtils.copy(in, out);
/*    */ 
/* 39 */     return out;
/*    */   }
/*    */ 
/*    */   public File generate(Entity entity) throws Exception
/*    */   {
/* 44 */     if (!this.aleradyGenerate) {
/* 45 */       this.aleradyGenerate = true;
/*    */ 
/* 47 */       return generateFile(entity, new File(this.templateDir.getPath(), "pom.xml"), getFile(entity));
/*    */     }
/*    */ 
/* 50 */     return null;
/*    */   }
/*    */ 
/*    */   public boolean existFile(Entity entity)
/*    */   {
/* 55 */     if (!this.aleradyGenerate) {
/* 56 */       return super.existFile(entity);
/*    */     }
/*    */ 
/* 59 */     return false;
/*    */   }
/*    */ 
/*    */   public File getFile(Entity entity)
/*    */   {
/* 64 */     return new File(getDirectory(), "pom.xml");
/*    */   }
/*    */ 
/*    */   public File getDirectory()
/*    */   {
/* 69 */     return new File(this.outputDir.getPath());
/*    */   }
/*    */ 
/*    */   public String getTemplate()
/*    */   {
/* 74 */     return "pom.xml";
/*    */   }
/*    */ }

/* Location:           C:\Users\lzl6066\Downloads\net.sourceforge.appgen_1.2.0\plugins\net.sourceforge.appgen_1.2.0.201002031718\
 * Qualified Name:     net.sourceforge.appgen.generator.PomFileGenerator
 * JD-Core Version:    0.6.0
 */